﻿{include file="header.tpl" title=info}

<div class="header"></div>
<div class="nav">
    <a href="home.php" class="active">主页</a>
    <a href="profile.php">个人</a>
    <a href="#">群组</a>
    <a href="#">搜索</a>
</div>
<div class="mainContent">
    <div class="left">
<!--
	<img src="../img/in.jpg" />
-->

<form action="search.php">
<div>
	<font size="3px">今天去哪里游味呢，搜搜看:<input name="sw" style="width:400px;" />	</font>
	<input type="submit" text="搜索" />
</div>
</form>
<div style="width:100%; height:22px; display:block; margin-bottom:20px;margin-top:20px;margin-left:90px;">
		<a href="home.php?action=all" class="active">随便看看</a>
		<a href="home.php?action=go">我想去的地方</a>
		<a href="home.php?action=come">我可以接待的朋友</a>
		<a href="home.php?action=together">适合结为旅伴的朋友</a>
		<!-- 
		<a href="home.php?action=news">好友动态</a>
		-->


{if $info.action == "all"}

{elseif $info.action == "go"}
<form name="choose_distination" method="get" action="home.php"> 
	<label for="subject">选择您想去的地方:</label>
	<input type="hidden" name="action" value="go" />
	<select id="distination" name="distination" onChange="document.choose_distination.submit()">
		{if isset($info.session.distination_setting)}
		<option value="{$info.session.distination_setting}">{$info.session.distination_setting}</option> 
		{else}
		<option value="0" selected="selected">选择一个地点...</option> 
		{/if}
		<option value="北京">北京</option> 
		<option value="上海">上海</option> 
		<option value="昆明">昆明</option> 
		<option value="深圳">深圳</option> 
		<option value="台北">台北</option> 
	</select> 
</form> 		
{elseif $info.action == "come"}	
<form name="choose_location" method="get" action="home.php"> 
	<label for="subject">选择您所在的城市:</label>
	<input type="hidden" name="action" value="come" />
	<select id="location" name="location" onChange="document.choose_location.submit()"> 
		{if isset($info.session.location_setting)}
		<option value="{$info.session.location_setting}">{$info.session.location_setting}</option> 
		{else}
		<option value="0" selected="selected">选择一个地点...</option> 
		{/if}	
		<option value="北京">北京</option> 
		<option value="上海">上海</option> 
		<option value="昆明">昆明</option> 
		<option value="深圳">深圳</option> 
		<option value="台北">台北</option> 
	</select> 
</form> 
{elseif $info.action == "together"}	

<form name="choose_distination" method="get" action="home.php"> 
	<label for="subject">选择您想去的地方:</label>
	<input type="hidden" name="action" value="together" />
	<select id="distination" name="distination" onChange="document.choose_distination.submit()"> 
		{if isset($info.session.distination_setting)}
		<option value="{$info.session.distination_setting}">{$info.session.distination_setting}</option> 
		{else}
		<option value="0" selected="selected">选择一个地点...</option> 
		{/if}
		<option value="北京">北京</option> 
		<option value="上海">上海</option> 
		<option value="昆明">昆明</option> 
		<option value="深圳">深圳</option> 
		<option value="台北">台北</option> 
	</select> 

</form> 
{/if}

</div>

<br>	


      <div class="slider">


      </div>
      <div class="content">
        <!-- loop -->
        <table cellpadding="0" cellspacing="0" class="msg">
		{foreach from=$info.state_list item=desc}

        <tr class="msgblock">
        	<td class="no">o</td>
            <td class="head"><a href="friend.php?uid={$desc.uid}" target="_blank"><img src="../images/icon/{$desc.image_path}" /></a>
			<font color="green" size="-3">{if $desc.sex == 'F'}女生{elseif $desc.sex == 'M'}男生{else}保密{/if}</font>
			</td>
			
	
            <td class="text">
            	<h6><a href="#">{$desc.real_name}</a></h6>  @  <h6><a href="#">{$desc.current_city}</a></h6>

			{if $info.action == "all"} 	
			
				{if $desc.state_type == 1}  
					想去<h6><a href="#">{$desc.target}</a></h6>

					<font color="orange">期望服务:
					[{if ($desc.service & 1) == 1}
						订票#
					{/if}
					{if ($desc.service & 2) == 2}
						导游#
					{/if}
					{if ($desc.service & 4) == 4}
						住宿#
					{/if}]
					</font>

					<span><div style="float:right">[{$desc.post_date}]</div></span> 
					<!-- 
					<a href="#">回复</a> 
					-->
	                <div class="leavemsg">{$desc.comment}</div>				
					
				{elseif $desc.state_type==3}				
					希望结伴去<h6>{$desc.target}</h6>
					<span><div style="float:right">[{$desc.post_date}]</div></span><!--<a href="#">回复</a>-->
					<div class="leavemsg">{$desc.comment}</div>				
				{/if}
			{elseif $info.action == "go"}	
					

					<font color="orange">可以提供服务:
					[{if ($desc.service_provided & 1) == 1}
						订票
					{/if}
					{if ($desc.service_provided & 2) == 2}
						导游
					{/if}
					{if ($desc.service_provided & 4) == 4}
						住宿
					{/if}]
					</font>
					
					<!-- 
					<a href="#">回复</a> 
					-->
	                <div class="leavemsg">{$desc.self_description}</div>				
			
			{elseif $info.action == "come"}
					想到<h6><a href="#">{$desc.target}</a></h6>

					<font color="orange">
					[{if ($desc.service & 1) == 1}
						订票
					{/if}
					{if ($desc.service & 2) == 2}
						导游
					{/if}
					{if ($desc.service & 4) == 4}
						住宿
					{/if}]
					</font>

					<span><div style="float:right">[{$desc.post_date}]</div></span> 
					<!-- 
					<a href="#">回复</a> 
					-->
	                <div class="leavemsg">{$desc.self_description}</div>				
			
			{elseif $info.action == "together"}			
				{if $desc.state_type==3}				
					希望结伴去<h6>{$desc.target}</h6>
					<span><div style="float:right">[{$desc.post_date}]</div></span><!--<a href="#">回复</a>-->
					<div class="leavemsg">{$desc.comment}</div>				
				{/if}
			{/if}

            </td>
        </tr>		
		{/foreach}
        <!-- end loop -->
        </table>
		
        <p class="pages"><a href="#" class="preview">&lt;</a><a href="#">1</a><a href="#">2</a><a href="#">3</a><a href="#">4</a><a href="#">5</a><a href="#" class="next">&gt;</a></p>
      </div>
    </div>
	

    <div class="right">
        <div class="groups smodule">
        	<a href="#" class="more">查看更多</a>
            <h5>ECHO的群组</h5>
            <div class="clear"></div>
            <!-- loop -->
            <a href="#"  target="_blank"><img src="../img/1smallHead.png" /><p>echo</p></a>
            <a href="#"><img src="../img/1smallHead.png" /><p>echo</p></a>
            <a href="#"><img src="../img/1smallHead.png" /><p>echo</p></a>
            <a href="#"><img src="../img/1smallHead.png" /><p>echo</p></a>
            <a href="#"><img src="../img/1smallHead.png" /><p>echo</p></a>
            <a href="#"><img src="../img/1smallHead.png" /><p>echo</p></a>
            <a href="#"><img src="../img/1smallHead.png" /><p>echo</p></a>
            <a href="#"><img src="../img/1smallHead.png" /><p>echo</p></a>
            <a href="#"><img src="../img/1smallHead.png" /><p>echo</p></a>
            <!-- end loop -->
        </div>
    </div>
	
</div>

{include file="footer.tpl" title=foo}
